<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('order/index')}">订单列表</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('order/index')}">
        订单号：
        <input class="form-control" type="text" name="title" style="width: 200px;" value="{:input('request.title')}" placeholder="订单号">
        报名课程:
        <select class="form-control" type="text" name="sign_up_ids">
            <option value=""></option>
            <foreach name="sign_up_list" item="vo">
                <option value="{$vo.id}" <if $vo.id == input('sign_up_ids')>selected</if> >{$vo.title}</option>
            </foreach>
        </select>
        状态：
        <select class="form-control" name="status">
            <option value="">---请选择---</option>
            <option value="1" <if input('status') == 1>selected</if> >已报名</option>
            <!-- <option value="2" <if input('status') == 2>selected</if> >退款中</option> -->
            <option value="3" <if input('status') == 3>selected</if> >已退款</option>
        </select>
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('order/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>订单号</th>
                <th>用户</th>
                <th>报名课程</th>
                <th>订单金额</th>
                <th>订单状态</th>
                <th>付款时间</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.son_order_no}</td>
                    <td>{$vo.user.mobile}</td>
                    <td>{$vo.sign.title}</td>
                    <td>{$vo.amount}</td>
                    <td>{$vo.status_text}</td>
                    <td>{$vo.pay_time}</td>
                    <td>
                        <if $vo.status == 1>
                            <a href="{:url('order/refund',array('id'=>$vo['id'],'type'=>1))}" class="btn btn-xs btn-primary js-ajax-dialog-btn">仅退款</a>
                            <a href="{:url('order/refund',array('id'=>$vo['id'],'type'=>2))}" class="btn btn-xs btn-primary js-ajax-dialog-btn">退款退课</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>